#ifndef COMMON_H
#define COMMON_H

#include <stdio.h>
#include "Nano100Series.h"

#ifdef DEBUG
#define info(...) printf(__VA_ARGS__)
#define LogDebug(...) printf(__VA_ARGS__)
#else
#define info(format, ...)
#define LogDebug(...)
#endif // #ifdef DEBUG

// unsigned int (32 bit)
#define VERSION_MAJOR	(1)
#define VERSION_MINOR	(12)

#define MODE_2D			0
#define MODE_3D_FULL	1
#define MODE_3D_HALF	2

#define BRIGHTNESS_MIN	(90)
#define BRIGHTNESS_MAX	(138)

typedef void (*I2C_FUNC)(uint32_t u32Status);

struct i2c_ctrl_data {
	uint8_t addr;
	uint8_t tx_data[16];
	int 	tx_data_index;
	int 	tx_data_length;
	uint8_t rx_data[16];
	int 	rx_data_index;
	int 	rx_data_length;
	I2C_FUNC	xfer_func;
	int 	flag_finished;
};

extern uint8_t status_3d;
extern uint8_t status_3d_to_set;
extern uint8_t is_video_on;
extern struct hg_config tHgConfig;

#endif // #ifndef COMMON_H
